/*
 * RDC_DataStructs.h
 * This file contains the basic header information required for the RDC messages.
 *
 */

#ifndef __INCLUDE_RDC_DATASTRUCTS_H__
#define __INCLUDE_RDC_DATASTRUCTS_H__

#include "stdint.h"

#define FS_NO_DATA 0x00
#define FS_NORMAL_OPERATION 0x03
#define FS_FUNCTIONAL_TEST 0x0C
#define FS_NO_COMPUTED_DATA 0x30


/* The following data structures were generated based on D6-16Z002-01:
 * "787 Data Payload Format Requirements", Revision A
 */
 
 
/* Structure for Functional Status Bytes, as described by D6-16Z002-01 */
typedef struct D616Z002_MESSAGE_FSS_STRUCT
{
    uint8_t FS1;
    uint8_t FS2;
    uint8_t FS3;
    uint8_t FS4;
} MESSAGE_FSS_TYPE;


/* Structure for Reserved Word, as described by D6-16Z002-01 */
typedef struct D616Z002_MESSAGE_RESERVED_STRUCT            
{
    uint32_t RESERVED;
} MESSAGE_RESERVED_TYPE;

/* The following data structures were generated based on SDD14551-1:
 *  "RDC I/O Catalogue"
 */

/* Structure for payloads conforming to RDC Template 13000 (discrete input) */
typedef struct RDC_TEMPLATE_13023_STRUCT
{
    uint32_t BITS;
} RDC_DISCRETE_INPUT_TYPE;

/* Structure for payloads conforming to RDC Template 11022 (discrete output) command structure */
typedef struct RDC_TEMPLATE_11022_COMMAND_STRUCT
{
    uint32_t BITS;
} RDC_DISCRETE_OUTPUT_COMMAND_TYPE;

/* Structure for payloads conforming to RDC Template 11022 (discrete output) response structure */
typedef struct RDC_TEMPLATE_11022_RESPONSE_STRUCT
{
    uint16_t PAD;
    uint16_t VOLTS;
    uint32_t OPEN;
    uint32_t GROUND;
    uint32_t STATE;
} RDC_DISCRETE_OUTPUT_RESPONSE_TYPE;

#endif
